<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");

//$now_member=select_one_line_all_items($table_Prefix."member","nid = '".$_REQUEST ['nid']."'");
//$now_agent=select_one_line_all_items($table_Prefix."employee","nid = '".$now_member ['agentnid']."'");
//
//电子邮件发送程序
//引入发送email必须的文件
include_once (ROOT_PATH_."/application/mailbox/mail.php");
?>

<?php
//接收需要修改的数据的id
//$new_detail_nid          = addslashes($_REQUEST['nid']);
//print_r2($_REQUEST);
$now_agent=select_one_line_all_items($table_Prefix."employee","nid = '".$_REQUEST['agentnid']."'");

//print_r2($now_agent);
$t = $_REQUEST['mail_theme'];
send_mail2($_REQUEST['mail_email'],$_REQUEST['ai_content'],$now_agent,$t);

$_REQUEST['ai_name'] = $_REQUEST['mail_theme'];
$_REQUEST['ai_authur'] = $_REQUEST['agentnid'];
$_REQUEST['ai_contact_way'] = $_REQUEST['mail_email'];

$sql=insert_date($table_prefix."member_contact_log",$_REQUEST);

$query = mysql_query($sql) or die ("error:".mysql_error().$sql);

?>



<script type="text/javascript">
    document.write('邮件已发送');
   // alert("输入信息已保存，点击确认返回继续操作.");
    // location.reload();
  //  document.location.href = "../view/detail-edit.php?nowpageid=<? echo $nowpageid ?>&sortby=<? echo $sortby?>&nid=<? echo $new_detail_nid ?>&now_extender=<? echo $now_extender ?>"
</script>

